<input type="text" size="10" value="" id="dialog" readonly="readonly"/> <button id="dialogButton" type="button">Open dialog</button>
<script type="text/javascript">
    function setDateFromDialog(date) {
        $("#dialog").val(date);
    }
</script>